package jsyf.oa.facade.system;

import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
import com.alibaba.fastjson.JSONObject;

import javax.ws.rs.Consumes;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import java.util.List;

/**
 * Created by Administrator on 2017/12/8 0008.
 */

@Path("/regionService")
@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
public interface RegionFacade {

    @Path("/save")
    String save(String entity);

    @Path("/delById")
    Boolean delById(String id);

    @Path("/removeById")
    boolean removeById(String id);

    @Path("/getTreeNodes")
    List<JSONObject> getTreeNodes();

    @Path("/getRegionByUserId")
    JSONObject getRegionByUserId(String userId);

    @Path("/getBigRegionListByCompanyId")
    List<JSONObject> getBigRegionListByCompanyId(String companyId);

    @Path("/getBigRegionListByUserId")
    List<JSONObject> getBigRegionListByUserId(String userId, String isBigRegion);

    @Path("/getSmallRegionListByParentId")
    List<JSONObject> getSmallRegionListByParentId(String parentId);

    @Path("/sort")
    Boolean sort(String regionIds);

    @Path("/getRegionByWreport")
    String getRegionByWreport(String userId,String roleName);

}
